package com.smbms.controller.resolver;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver;

/**
 * 注解
 * 继承自定义全局异常处理
 * @ClassName: SmbmsMVCException 
 * @Description: (这里用一句话描述这个类的作用) 
 * @author Lyrk.Guo
 * @date 2018年7月10日 下午5:22:02
 */
public class SmbmsMVCException extends AbstractHandlerExceptionResolver {

	
	@Override
	protected ModelAndView doResolveException(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2,
			Exception e) {
		
		e.printStackTrace();
		
		return new ModelAndView("error");
	}

}
